package viqiang.ye.thread;

import org.junit.Test;

import java.lang.reflect.Proxy;

public class JDKProxyDemo {

    @Test
    public void test(){
        CustomizeHandle handle = new CustomizeHandle(ISubjectImpl.class) ;
        ISubject subject = (ISubject) Proxy.newProxyInstance(JDKProxyDemo.class.getClassLoader(), new Class[]{ISubject.class}, handle);
        subject.execute() ;
    }
}
